﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace ShenLanCMS.Models
{
    /// <summary>
    /// 模板变量
    /// </summary>
    public class TempVar
    {
        [System.ComponentModel.DataAnnotations.Key]
        public Guid TempVarID { get; set; }

        /// <summary>
        /// 变量唯一标识
        /// </summary>
        [Display(Name = "变量唯一标识")]
        [Required(ErrorMessage = "请填写{0}")]
        [StringLength(64)]
        public string TempCase { get; set; }

        /// <summary>
        /// 变量名称
        /// </summary>
        [Display(Name = "变量名称")]
        [Required(ErrorMessage = "请填写{0}")]
        [StringLength(64)]
        public string TempName { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        [Display(Name = "内容")]
        [Required(ErrorMessage = "请填写{0}")]
        [DataType(DataType.MultilineText)]
        [StringLength(1000000)]
        public string Content { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        [Display(Name = "是否启用")]
        public bool IsEnable { get; set; }
    }
}
